import request from './request'

// 文件上传
export function upload(formData) {
  return request({
    url: '/upload',
    method: 'post',
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    onUploadProgress: function (progressEvent) {
      // 处理原生进度事件
      console.log(progressEvent)
    },
    data: formData
  })
}
